<%--
  Created by IntelliJ IDEA.
  User: litao
  Date: 2020/2/19
  Time: 14:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>我的移动端</title>
    <%@include file="head.jsp" %>
    <link href="/font-awesome/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>


<div class="weui-panel weui-panel_access">
    <div class="weui-panel__bd">
        <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">
            <div class="weui-media-box__hd">
                <img class="weui-media-box__thumb" src="${info.headimgurl}">
            </div>
            <div class="weui-media-box__bd">
                <h4 class="weui-media-box__title">${info.nickname}</h4>
                <%--                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。</p>--%>
            </div>
        </a>
    </div>

    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">用户姓名</label></div>
        <div class="weui-cell__bd">
            <input id="inputUserName" class="weui-input" type="text" placeholder="请输入用户姓名">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">手机号码</label></div>
        <div class="weui-cell__bd">
            <input id="inputPhoneNumber" class="weui-input" type="text" placeholder="请输入手机号码">
            <input id="openid" class="weui-input" type="hidden" value="${info.openid}" placeholder="请输入openid">
            <input id="unionid" class="weui-input" type="hidden" value="${info.unionid}" placeholder="请输入unionid">
            <input id="nickname" class="weui-input" type="hidden" value="${info.nickname}" placeholder="请输入unionid">
        </div>
    </div>

</div>
<%--<div class="button-sp-area">--%>
<%--    <a href="javascript:;" id="btnAuth" class="weui-btn weui-btn_mini weui-btn_primary" onclick="registerWxUser()">申请授权</a>--%>
<%--    <a href="javascript:;" id="btnPerson" class="weui-btn weui-btn_mini weui-btn_primary" onclick="loginPersonGoHome()">返乡数据</a>--%>
<%--    <a href="javascript:;" id="btnIsolation" class="weui-btn weui-btn_mini weui-btn_primary" onclick="isolation()">隔离数据</a>--%>
<%--    <a href="javascript:;" id="btnSampling" class="weui-btn weui-btn_mini weui-btn_primary"--%>
<%--       onclick="caiyangData()">采样数据</a>--%>
<%--    &lt;%&ndash;    <a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_mini weui-btn_primary"&ndash;%&gt;--%>
<%--    &lt;%&ndash;       onclick="controlButton()">按钮控制</a>&ndash;%&gt;--%>
<%--</div>--%>

<div class="weui-grids" style="color: #3cc51f">
    <a href="" class="weui-grid js_grid">
        <div class="weui-grid__icon" onclick="test()">
            <i class="fa fa-camera-retro fa-2x"  style="color: green" ></i>
        </div>
        <p class="weui-grid__label">
            扫一扫
        </p>
    </a>
    <a href="" class="weui-grid js_grid">
        <div class="weui-grid__icon"  onclick="auth()">
            <i class="fa fa-address-card fa-2x"  style="color: green"></i>
        </div>
        <p class="weui-grid__label">
            应用授权
        </p>
    </a>
    <a href="" class="weui-grid js_grid">
        <div class="weui-grid__icon"  onclick="test()">
            <i class="fa fa-whatsapp fa-2x" style="color: green"></i>
        </div>
        <p class="weui-grid__label">
            申请授权
        </p>
    </a>
    <a href="" class="weui-grid js_grid">
        <div class="weui-grid__icon"  onclick="test()">
            <i class="fa fa-car fa-2x" style="color: green"></i>
        </div>
        <p class="weui-grid__label">
            返乡数据
        </p>
    </a>
    <a href="" class="weui-grid js_grid">
        <div class="weui-grid__icon"  onclick="test()">
            <i class="fa fa-hospital-o fa-2x" style="color: green"></i>
        </div>
        <p class="weui-grid__label">
            隔离数据
        </p>
    </a>
    <a href="" class="weui-grid js_grid">
        <div class="weui-grid__icon"  onclick="test()">
            <i class="fa fa-medkit fa-2x" style="color: green"></i>
        </div>
        <p class="weui-grid__label">
            采样数据
        </p>
    </a>
    <a href="" class="weui-grid js_grid">
        <div class="weui-grid__icon"  onclick="test()">
            <i class="fa fa-magic fa-2x" style="color: green"></i>
        </div>
        <p class="weui-grid__label">
            更多
        </p>
    </a>
</div>
<div class="weui-cell">
    <div class="weui-media-box__hd">
<%--        <img width="150px" class="weui-media-box__thumb" src="qrcode?uuid=<%=uuid%>">--%>
    </div>

    <div class="weui-cell__bd">
        <div class="weui-cells__title">软件建议</div>
        <textarea id="suggest" class="weui-textarea" placeholder="" rows="3"></textarea>

        <div class="weui-textarea-counter"><span id="countSuggest">0</span>/200</div>

    </div>
</div>
<div class="button-sp-area">
    <button href="javascript:;" id="btnSuggest" class="weui-btn weui-btn_mini weui-btn_primary" onclick="postSugguest()">
        提交建议
    </button>
</div>
<div class="weui-footer">
    <p class="weui-footer__text">Copyright © 2020 沂水县卫生健康局</p>
</div>




<%--<div class="weui-msg">--%>

<%--    <div class="weui-msg__extra-area">--%>
<%--        <div class="weui-footer">--%>
<%--            <p class="weui-footer__text">Copyright © 2020 </p>--%>
<%--        </div>--%>
<%--    </div>--%>
<%--</div>--%>

<%@include file="footer.jsp" %>
<script>
    $(document).ready(function () {
        var vConsole = new VConsole();
        console.log('VConsole is cool');

    });

    function test() {
        alert("正在设计中...");
    }

    function auth() {
        var jsonData = JSON.stringify({
            nickname: $("#nickname").val(),
            openid: $("#openid").val(),
            unionid: $("#unionid").val(),
            appName: $("#appName").val(),
            clientid: $("#clientid").val()
        });
        $.ajax({
            url: '/auth/getAuthorization',
            type: 'post',
            dataType: 'json',
            data: jsonData,
            contentType: "application/json",
            async: false,
            timeout: 50000,
            success: function (data) {
                console.log(data);
                $.alert(data.message);
            },
            error: function (msg) {
                console.log(msg);
                $.alert(msg);
            }
        });
    }
</script>
</body>
</html>
